public void run(){
		
			boolean keepGoing = true;
			while(keepGoing){
				try{
					cm = (ChatMessage) sInput.readObject();
				}
				catch(IOException e){
					display(username + "Exception reading streams: " + e);
					break;
				}
				catch(ClassNotFoundException e){
					break;
				}
				String message = cm.getMessage();
				switch(cm.getType()){
					case ChatMessage.MESSAGE:
						broadcast(username+ ": " + message);
						break;
					case ChatMessage.LOGOUT:
						display(username + "disconnected with a LOGOUT message.");
						keepGoing = false;
						break;
					case ChatMessage.WHOISIN:
						writeMsg("List of the users connected at " + sdf.format(new Date()) + "\n");
						for(int i= 0; i<al.size(); ++i){
							ClientThread ct  =al.get(i);
							writeMsg((i+1) + ")" + ct.username + " since " + ct.date);
						}
						break;
				}
			}
			remove(id);
			close();
		}