integrated new "runCommand" - HAS BUGS