refactored time util methods