re-order code slightly