more refactoring of timeclock