pass attachment by ref