finish several basic dp exercises