prim: hopefully fixed stepping through the pseudocode