Refactored pairing method and wrote tests for it