finish percolation model with weighted quick-union method