overload the runCommand method