added two_pair methods and tests