remove compareTo (which behaved in a non-standard way) and implement equals