reorg script