factored Folding into Scanner and Folding