fixed bug
added a function d which uses the D object