* added checks for valid ip and port