added timer for algorithm.  added both undirected and directed graphs to run through the algorithm