added __eq__ and __hash__, extended test