handling custom ports