session little refactor