added plotting functions to help with QA