added I/O for connection