memcpy reinstated in d_remap. working, i think