Code for Week 5.