Complete the codes and slides for Chap. 4