modified the primer_chapter10_pair.cc