use copying instead of function call