Updated for Week3 code