implements version graph data structure.