add a bit of logic into analyzing the links