added the ability to output the program