begin to write Session struct