new RunCommand function