rename generate_key to generate_set