add equals and hashcode methods