repairing graph