added union find + tests