fixed if ststement for time of day class