adding session object; generating provider accessor methods at runtime