changing equals and hashcode