removed time_to_sec function