handle session in initializer