modify and test chapter B