refactor pairing task logic

remove commented out code.