using a fold rather than a match after reading the repo