change sequence of topid and rclass assignment