finished third plot and code