Composit DP code Reorganized