added windows service functionality