rework plugin, add flat-table syntax