rearrange the commands