refactoring search.coffee and renamed it