d2b implementation partially