building something like a graph