passed wstr by reference