slight modification of light calculations