refactor getLinks attr