STL exercise 7