implemented plot 3
eliminates a bit of duplication in third plot