changed port attribute to "portnum".