re-order commands