edits to plotting script