public static ProtocolToClient idClientProto(String proto) {
        // get the prefix cmd
        String prefix = proto.split(" ")[0].trim();
        
        if(prefix.equals(CLIENT_RECEIVED_CHAT_MESSAGE)) {
            return ProtocolToClient.RECEIVED_CHAT_MESSAGE;
        }
        
        if(prefix.equals(CLIENT_USERS_LOGGED_IN_NOTIFICATION)) {
            return ProtocolToClient.USERS_LOGGED_IN_NOTIFICATION;
        }
        
        if(prefix.equals(CLIENT_MESSAGE_SUCCESSFULLY_SENT)) {
            return ProtocolToClient.MESSAGE_SUCCESSFULLY_SENT;
        }
        
        if(prefix.equals(CLIENT_RECEIVED_TYPING_STATUS)) {
            return ProtocolToClient.RECEIVED_TYPING_STATUS;
        }
        
        if(prefix.equals(CLIENT_THIS_USER_LOGGED_IN_NOTIFICATION)) {
            return ProtocolToClient.THIS_USER_LOGGED_IN_NOTIFICATION;
        }
        
        if(prefix.equals(CLIENT_ERROR_USERNAME_DOES_NOT_EXIST)) {
            return ProtocolToClient.ERROR_USERNAME_DOES_NOT_EXIST;
        }
        
        if(prefix.equals(CLIENT_GOODBYE)) {
            return ProtocolToClient.GOODBYE;
        }
        
        if(prefix.equals(CLIENT_ERROR_USERNAME_ALREADY_TAKEN)) {
            return ProtocolToClient.ERROR_USERNAME_ALREADY_TAKEN;
        }
        
        if(prefix.equals(CLIENT_HELLO)) {
            return ProtocolToClient.HELLO;
        }
        
        return null;
    }