First part of problem 1.a done.