implements session model. closes #19