proper support for multiple sessions
continuing to modify for multiple sessions