RunProgram funciton, needed for the tester