added rt_id in encoding