quick port of raw_weight for 2-step shortest paths BROKEN FOR THREE-STEP PATHS