reworked the ring finder algorithm greatly, tries harder to find the optimal solution