some improvements to the data population script