shorten and optimize time_semester_test