Main Search Procedure