use function pointer fields in struct graph and improve statistics output.