search fixed, unittests corrected