code and 4 plots finished