add longest Path DAG class