rearrange script