added peg labels
Modified state space and plotter