Refactor forEachSeriesDo