added code for session 3 & 4