session and encoding