updated compareTo