add indices to tables