Cleaner version of Loop with Builder Monad