Why isn't this just add_command? Then you don't need the command = add_command above -- use add_command everywhere...