Added code from Thursday pairing