removing pass by reference