refactor and add links