added client logic, all that's left is handshaking and data sharing