Code for session 5