chp 2 - 7 code base