Refactoring Search Action