Almost Final code with plots 1 through 4