Fixed an error in function create_pair_list that did not return the value