Make greet generic, and add time logic