patched up attachmode