adding ref to index