new version with link discovery