adding Method.hashCode so equal ids are equal method