open session when set variable