private void formatResponse(String response)
    {
        String[] responseArray = response.split(" ");
        int charCount = 0;
        int charSpacesLeft = maxOutputLength;
        
        for(int i = 0; i < responseArray.length; i++) {
            String word = responseArray[i];
            
            if(word.contains("\n")) {
              int indexOf = word.indexOf("\n");
              String str = word.substring(0, indexOf);
              word = str;
            }
            
            if(word.length() <= charSpacesLeft) {
                System.out.print(word + " ");
                charSpacesLeft = charSpacesLeft - (word.length() + 1);
            }
            else {
                System.out.print("\n" + word + " ");
                charSpacesLeft = maxOutputLength;
            }
        }
        System.out.println();
    }