* now sorting vectors instead of arrays in order to test with
  different values of N