Implement exercises 1 - 7