Cosmic ray electron spectrum due to the dispersion of injection spectrum