add equals and hashcode to all key classes