first operative version of main_script_pairs_std