add indices to string format