implement week 3 homework