added the path compression heurestic