refactoring and added 'execute_first' option to CommandResults