added feature to allow custom server address