update topology code