added use of the wcslen function