refactor lineup logic into a class