Completed exercises 6.5 1-3