Add more sophisticated method to find a new port.