more notes and code for weighte QU with path compression