done through exercise 12