added flat to switch between Id and no id output