fixed add problem but now test 6 takes too much memory. probable culprit: some edges have no weight, resulting in mismatch of indices when trying to find real valued weights