d2b method fixed - code complete