fixing photon threshold