private static boolean handleUpdate(String update) {
        // filter out clutter from the server
        if (update == null || update.equals("")) {
            return true;
        }
        
        // do not display HELLO messages from the server, but show everything else
        if (!update.trim().equals(Protocol.CLIENT_HELLO)) {
            System.out.println("[DEBUG] Msg from server: " + update);
        }
   
        
        /*
         *  Figure out what the server sent us and process it 
         *  
         *  
         *  */
        Protocol.ProtocolToClient proto = Protocol.idClientProto(update);
        switch (proto) {
        case RECEIVED_CHAT_MESSAGE:
            String fromUser = update.split(" ")[1].trim();
            String rmessage = update.split(">")[1].trim();

            // Add the chat message to the specific conversation window
            contactsView.conversation(fromUser, rmessage);
            break;

        case USERS_LOGGED_IN_NOTIFICATION:
            String onlineUsers = update.split(">")[1].trim();

            // Show the currently online users
            contactsView.setContactList(onlineUsers);
            break;

        case MESSAGE_SUCCESSFULLY_SENT:
            String toUser = update.split(" ")[1].trim();
            String smessage = update.split(">")[1].trim();

            // Show that the message went through on our screen
            contactsView.conversation(toUser, smessage);
            break;

        case RECEIVED_TYPING_STATUS:
            String typingUser = update.split(" ")[1].trim();
            String status = update.split(">")[1].trim();

            // Show that typingUser has status
            contactsView.setTypingStatus(typingUser, status);
            break;

        case THIS_USER_LOGGED_IN_NOTIFICATION:
            String username = update.split(">")[1].trim();

            // We're logged in. Show the contacts list, hide login screen.
            loginView.setVisible(false);
            contactsView = new ContactsView(clientModel, username);
            contactsView.setVisible(true);

            clientModel.setView(contactsView);
            break;
            
        case ERROR_USERNAME_ALREADY_TAKEN:
            // we can't login because the username is already logged in
            loginView.retryUser();
            break;
        case ERROR_USERNAME_DOES_NOT_EXIST:
            break;
        case GOODBYE:
            System.exit(0);
            break;
        }
        return true;
    }