Added code for session 3.