added class ClientMain and coded the message exchange between clients