add d. and some fixes
add d. and some fixes (forgotton to add)