making attachment and link term search work