did some refactoring. tested for 100k links