plotting function added
clean up and plot