Added hashCode and equals methods