refine linking and unlinking workflowsg