add longest path search