add session factory

add session factory