adding port handling