recreated codesign stuff