refactored TimeCtrl