order classes by time