resolved a minor bug in runProgram
added undo functionality and mostly this marks the end of assignment 2