private static AckResponse generateResponse(Request req, String userID, String type, String groupID) {
          if (req instanceof ReadRequest) 
          {
            Journal jurre = db.getJournal(req.getID(), userID, groupID, type);
            if (jurre == null) 
              return new AckResponse(false, "\"access denied\"... ?");
            return new AckResponse(true, jurre.toString());
          } 
          else if (req instanceof ListRequest) 
          {
            String journals = "\n";
            for (Journal j : db.getMyJournals(userID, groupID, type))
              journals += j.getMetaData() + "\n";
            return new AckResponse(false, "Retrieved journals:"+journals);
          } 
          else if (req instanceof DeleteRequest) 
          {
            return new AckResponse(true, "Attempted delete of: " + req.getID() + " result: " 
                + db.deleteJournal(req.getID(), userID, type));
          } 
          else if (req instanceof AddRequest) 
          {
            AddRequest addRequest = (AddRequest) req;
            Journal inJourn = addRequest.getJournal();
            Journal journ = new Journal(userID, inJourn.getNurse(), inJourn.getPatient(), groupID, inJourn.getContent());

            return new AckResponse(true, "Requesting to add from: " + userID + " Containing: \n" + journ + "\n" + 
                "result : " + db.insertJournal(journ, userID, type));
            
          } 
          else if (req instanceof EditRequest) 
          {
            EditRequest eReq = (EditRequest) req;
            return new AckResponse(true, "Requesting to edit: " + eReq.getID() + 
                " result: " + db.updateJournal(eReq.getID(), eReq.getContent(), userID, type));
          } 
          else if (req instanceof LogRequest) 
          {
            try {
              LogDatabase db2 = new LogDatabase();
              return new AckResponse(true, "Requesting log: \n" + db2.printLog(groupID));
            } catch (Exception e) {
              return new AckResponse(false, "ClassNotFounde");
            }
          } 
          else 
          {
            return new AckResponse(false, "Don't know wtf recieved from: " + userID);
          }
    
    }