Electron spin dynamics in semiconductors