added linkToAttachment helper