adding codes for the session chapter