new function in create_ring_ref.pl