chapter 3.3

mainly about dp