Use pointer instead of C++ reference