initial commit of hierarchical DP code