change print_leafentry to print_klpair