Moved mutator out of flatMap