rearrange of js