you don't need to refresh after each index operation. Just add a `refresh()` call after these 5 lines.