add session support, basic test case