solution for plotting exercise 1