tiny refactor in print_cookbook