pass by reference errorfix