moved format exporting into command