private String handleRequest(String input) throws IOException, IllegalArgumentException {
        System.out.println(input);
    	String nameReg = "[a-zA-Z0-9\\.]+";
    	String regex = "(boards)|(newBoard "+nameReg+")|"
    			+ "(switch "+nameReg+" "+nameReg+" "+nameReg+")|"
    			+ "(exit "+nameReg+")|(users "+nameReg+")|"
    			+ "(checkAndAddUser "+nameReg+" "+nameReg+")|"
    			+ "(draw "+nameReg+"( "+nameReg+")+)";
        
        if ( ! input.matches(regex)) {
            // invalid input
        	System.out.println("Invalid input: "+input);
            return null;
        }

        String[] tokens = input.split(" ");
        
        // Get Boards
        if (tokens[0].equals("boards")) {
        	return boards(tokens);
        } 
        //New Board
        else if (tokens[0].equals("newBoard")) {
        	return newBoard(tokens);
        } 
        // Switch Board
        else if (tokens[0].equals("switch")) {
        	return switchBoard(tokens);
        }
        // Exit 
        else if (tokens[0].equals("exit")) {
        	return exit(tokens);
        } 
        // Draw Command 
        else if (tokens[0].equals("draw")) {
        	return draw(tokens);
        } 
        // Check and add User
        else if (tokens[0].equals("checkAndAddUser")) {
        	return checkAndAddUser(tokens);
        } 
        // Get Users
        else if (tokens[0].equals("users")) {
        	return users(tokens);
        }

        // Should never get here-- should return in each of the valid cases above.
        throw new UnsupportedOperationException();
    }