perhaps reduced duplication too much
added parent step for [S, T] -> A flows