fix pass by reference use