move search from block.js to search.js