don't walk off the end of the pairs array