data output to format correctly