update gen For copy semantics for passing arguments to function