fixing script for figure 04