Create equals and hashcode method