added exercise 5.2