refactors pairing logic
adds to pairing logic