Adding basic graph manipulation functions