a scala unmanaged extension to find paths between nodes