rearrange JS