continued bugfixes and progress on chapter 2