create a main and start the search