comment out unused variable
use photon instead of z if there are photons