fixed the light calculation