Electron slowing down in solid targets: Monte-Carlo calculations