refactor links