add func outputRealFormat and rename some vars