Update equals and hashcode method