added windows support; now also returns the IP