added openPorts method