updated Figure 1 codes