main functions and interface for search ready