Code for Session 7