Changed hashCode and equals methods