ADDED: new method for port detection.
ADDED: new method for port detection.
ADDED: new method for port detection.