made socket hostname dynamic