adjusted plot, cleaned extraneous code