table definitions should be classes not object because of cloning issue