added some of the plotting functions