controller and tables