adds equals and hashCode to Target