finished first part of excercise 7