add print_config and def_diagram