cleaning up some of the time of day code