corrected the photon energy correction part