Updated equals and hashcode