optimize output format