simplify flow, per @indutny