update reverseLink function