fixing two-pairs? so that it passes unit test