add sol of dynamic programming