Refactored find spaced pairs