updated ch9 solution