Adding code for session 3