updating plotting functions