buffer code and session changes