functional table generation