correct demagle roitines
rename nextChar to more suitable currChar