add solution for problem1