changed  variable calls to  for number of pairs