Finished problem 1