added message if no links were found. refactoring