generate_unique_key is done