Updated for Week3's homework