writing index