figure 8 js update