Updating Week 3 code