changed Objects/hashCode to .hashCode to be compatible with older version of Java