updating links correctly