factor out repetitive links