pass by reference instead of value for the parameter functions