scripts for repartition