simplify flow logic
Merge pull request #6 from fyockm/patch-3

simplify flow logic