added functionality to light.html