graph.c - Trace function now works, but is unfinished