Rearranging script