updating links to use function