add attach.c