pass struct by reference