add weighted quick and path compression quick union