add solution to hw3 task 2