slimmer version of the plot script