added indeces to tables