Changed the __eq__ method and added the equal method