improved version

previous one has 15 IFs for figure 1 and 34 IFs for figure 2.
this one has 12 IFs for figure 1 and 31 IFs for figure 2.