ring detection