wip on search api refactor