added code for session 2