adapt d_* for shadow3box
some progress