changed (char) to (wchar_t)