move session to the constructor