first commit code for chappter 3.1