rework Graph initialization