minor improvements, chapter 1 python solutions