Changed compareTo method