refactor, looping, cabal