1st stage refactoring: session
refactoring 2nd stage: Unit