Added docstring to execute_command