runProgram implemented