got precompute for junctions to work