added root function to quick_union