Updated version of the week 3 homework