working getting classes by time functionality