add refactor getting Riak's hostname and port