added sleep block and checks for light schedule