added wrapper function to compare is_pair