add semetic check chapter 5