week 4 homework assignment solution