working version of plot2
minor edit in comments