dynamic programming try out