cleaned up hashcode and equals