add functionality to open/close sessions