fixed test for D_1 and tiny bug in computation of D_1