Working on problem 3.