graph manipulation