turning lights on and off with brightness