added rudimentary domain detection on windows, must improve later