trying to clean up arc selection (by length and shared), but not getting right results. see line 22-24.