update topsort