better port returning