corrected pair direction handling