add attach function