use get_bind_endpoint correctly