changed script to produce smaller files