Added a compareTo method