private void AddToResult(int i, int j)
{
//if we founded a match before add j to images i, otherwise add a new list of matches
if (!checkedImages[i])
{
checkedImages[i] = true;
matches.Add( new List<string>());
matches.Last().Add(images[i].getPath());
}
matches.Last().Add(images[j].getPath());
checkedImages[j] = true;
}