miscellaneous exercise on chapter 6