finished with plotting functions