finished return by ref.