fix quality flaws (equals and hashcode methods)