fixed equality in tests and added search