started writing index refresh method.