search box refactor into directive