changed from using portid to integer in server