make generate_pairs private, remove its test