updated compareTo method for course