search refactoring
new search structure