current time refactoring