fixed findset function