add solution for week 6 homeworks 1-4