Removing deprecated call by reference