added some directed graph algorithms