adding indexes to links