flowgram algorithm