add index to links