better speed calculations; better breakdown of various durations used in calculating when to turn on/off lights