Updated code in Week 4