edited PrintGraphStats function.