link preprocessing