adding quick union algirithm