pass by reference to close_ring