missing subtract of 1 if index is of type String