Update source code from Chap.7