quick union improvements (weighted and path compression) added