fixing search api implementation