implementing a simple client-server chat system