first version of tablegenerator, not tested