implement accumulate in flow dsl