changed plotting functions.