changes to time handling functions