keep track of current connection state and print to the screen