refactor API for links lengths and hence move to v3