add first pass at dp alg