some improvements in the scripts