finished topogicalSort