use index to save results