partial search refactor. needs response handling refactor.