script: rearrange stuff