adds index for links