d' calculations fixed