fix internal linking function