....also from philip,might be a hack to speed up shortest path