Adding DP method