updated runCommand