refactoring of State::lnt using a pre-visitor pattern