enable to set port after constructing the object