update flow graph