edited for light and timer.