re-order code