added real DP version of triangle