@Override
    public void run() {

        System.out.println(getId() + "# - New Thread at time: " + System.currentTimeMillis());

        // zu Beginn werden die IO Streams initialisiert
        initReaderPrinter();

        // solange der Client noch verbunden ist und noch kein BYE gesendet hat
        // werden die Commandos NEW, INFO und BYE verarbeitet
        while (clientConnected()) {
            try {
                List<String> tokens = tokenize(reader.readLine());
                String command = tokens.get(0);
                String send = error("Unknown Command"); // standard response if no command was recognzied.

                // ******************* Main Commands ***************************
                if (tokens.size() > 0) {    // make sure the input wasnt only spaces
                    if (command.equals(ClientProtocol.NEW)) {
                        // if the command is NEW, then tryout the new User
                        send = tryNewUser(tokens);
                    } else if (command.equals(ClientProtocol.BYE)) {
                        // if the command is bye, then remove my user and mark the end for the loop.
                        ServerMain.removeUser(user);
                        send = bye();
                        receivedBYE = true;
                    } else if (command.equals(ClientProtocol.INFO)) {
                        // if the command is info, then make userList
                        send = list();
                    }
                }
                // ******************* END Main Commands ***************************

                println(send);
            } catch (Exception e) {   // if anything happens in an iteration, print it out and end the loop.
                System.out.println(e);
                receivedBYE = true;
            }
        }
        // after the loop was finished (either by Exception or BYE command), remove the user (just to be safe)
        // and close various resources.
        ServerMain.removeUser(user);
        closeAll();
    }