Update logic for linking