modified scripts to generate figures