added overridden equals and hashCode methods