Pass by reference to reduce copying