public String findAuthorByIndex(ArrayList<Author> a, ArrayList<Book> b, int index) {
        
      String n = null; // author name
      String m = null; // book written
        
        for (Author e : a) {
            if (e.getIndex() == index) {
                n = e.getAuthorName();
            }
            for (Book q : b) {
                if (q.getAuthorIndex() == index) {
                    m = q.getbookTitle();
                    output = "         Author: " + n + 
                             "\nBooks written: " + m + "\n";
                break;
                } // end if
                else 
                    output = "Author not found";
            } // end nested for
        } // end for
            return output;
    } // end method