the use and override of the function hashcode and equals in the class