adapt to raw sessions