better version of week 2 homework FTW