created and updated index and arrays