gather the searches from within an if