updated plotting functions