save and load index so this can go a bit faster