Getting rid of deprecated pass by reference.