working return by ref