generate the list of pairs automatically