code review and plot2