final version of time formatting