The code is causing bookmarks to be inserted in reverse order. In other words, the bookmarks start with the highest number and go down to 0.