a more reasonable tsort