updated client-side link generation