(Updated week 7 homework assignment)