full code for week 4
plots done