pairs method should be iterating over just one way