add code to 5-5 to plot result and solve unit 5-9