extract attachMethod