refactored time services