assignment 2 - add solution of problem 1