adding code and plot output