done part of exercise 3