fixes applied + chapter 6