add plotting code and plots