commit chapter3 code