encapsulated session management