Implemented exercise 11.5