add interrupt and finish chapter 5