add links, refactoring