Solution code for problem 1