fixing a bug in find highway function