search with some bugs added this is elementary version correct bugs in next commits