add indices and tables