little change to cleanGraph