reorganize script