better check for valid url structure when adding links