Implement exercise 24-26