Completed half of exercise 3