TODO: modify chapter 2 and chapter 5