checkpoint work on refactoring variable usage