add equal method and test