add DP solution