adds first part of exercise 8