updated index to edit