Dtree finally done