Working on solution to DP