changed redshift to comoving distance in photon output