chapter 13: working and nice code=)
chapter 14: first try