added portnum to args and removed id