added solution for problem 17