algorithm modified: get extra nodes and edges(with two external nodes--not in source or dest) indirectly related to sources or destinations