ideally should also check if the index is there before doing any unnecessary work