counter example : using DP. Initial code