change to call by reference