initialize the script which looks for the best pair