Implement exercise 8 to 15