refactoring search module*