added better table initialization