fixed __eq__ and __ne__ and moved them to base class