code for session 3