move table initialization out of main func