working on the plotting script