adding all plotting code and image