added switch for leading photon to be first in list