Overrode equals and hashcode methods