rewrote graph_utils functions as dictionary
Rewrote graph_utils as dictionary