private static int getEngines(JSONObject responseOptions) throws JSONException {
        Object numberOfEnginesObj = responseOptions.get("NUMBER_OF_ENGINES");
        int numberOfEngines = 0;
        if (numberOfEnginesObj instanceof String) {
            numberOfEngines = Integer.parseInt((String) numberOfEnginesObj);
        }
        if (numberOfEnginesObj instanceof Integer) {
            numberOfEngines = (Integer) numberOfEnginesObj;
        }
        return numberOfEngines;
    }