implement week 4 assignment
implement week 4 assignment