added hashCode and equals methods to new classes