refactored, improved time-based timetable