smarter port finding