replace select 'rectangle' algorithm
finish timetable, close #9