Code for Week 8.