formats client connection into actionlistener