updated light.cpp