added a simple link detector