Change api of attach in documentation