improve the code, but still not able to reproduce colangelo2012 fig.1