Improvements to identification of flanking pairs