fix problems, change parsing for plot programs