refactor searches