Lab 2, Exercises 6-8