code for session 6