only generate link if provided