added indices to tables