add code for problem 1