change output format for sorting