basic version
v1 of DP. passed naive cases