some fixes

TODO: move path computation into parallel code