move search to main