moved time functions to util file