moved initializing tables to control