Simplifying findSet logic