revisiting Longest Path problem