fix equals and hashcode