implemented 1.b and 2 plots