switch to using time instead of datetime