more refactoring of recording logic into smaller methods