Updated class code for session 3