add detached attribute