rearrange js requirement order