added some plotting functions -jm