Added code for Figure 5--productivity