add utility function and use it on Windows as well