add attach for handlerFunc