moving "generate_name" to a class method