Error thrown
Cannot pass parameter 1 by reference