problem 2 initial code