checked in ch01 code