prob_11 flowkater refactoring