better table generation