New faster congregate algorithm based on thumbnails