refactor pairing task logic

:+1: