output should be the last command to execute