reorder kw_rest and block