Use paircursor for iteration where appropriate