add iostream for connection