Master Arrangement Letter  Confidential Information

APPLIED INTELLIGENCE GROUP, INC.
13800 Benson Road, Edmond, OK 73013-6417


October 24, 1996                                  EXHIBIT 10.40


                        ADDENDUM #3 (P3)

                               TO

                        MASTER AGREEMENT

                             between
                           SONIC CORP.
                               and
                APPLIED INTELLIGENCE GROUP, INC.



On this 24th day of October, 1996, SONIC CORP. ("Sonic") and
Applied Intelligence Group, Inc. ("AIG") agree to the following
Addendum to the Master Agreement dated July 31, 1996, and signed
by AIG and Sonic on July 31, 1996, and August 1, 1996,
respectively.

                   PROJECT SCOPE AND APPROACH

AIG's scope of work for this project focuses on developing the
Sonic POS on an NT platform with limited enhancements.  The
following points highlight the scope of our work:
    RE-WRITE SONIC'S CURRENT POS APPLICATIONS
    AIG will re-write, convert, and replace the current Sonic
    SCO POS applications with Microsoft NT compliant code.
    AIG's re-write will produce a system that:
        Can be maintained and improved without losing the
        functionality of the current system
        Minimizes the need for additional order taker
        documentation and training (because of similarity with
        SCO functionality)
        Provides the ability to make hardware improvements now
        and in the future
        Runs under the Microsoft NT operating system

    IMPLEMENT PREVIOUSLY WRITTEN SONIC POS APPLICATIONS
    AIG's POS re-write will include the conversion of previously
    implemented Sonic SCO POS/Host applications to the NT
    platform (Detailed Item Movement Collection, Daily Sales and
    Cash Balancing, and Payroll Time Card Collection).

    IMPLEMENT NT COMMUNICATIONS POLLING APPLICATION
    AIG will modify the in-store communication package provided
    by AIG to operate with the SCO operating system so that it
    will operate with the in-store NT platform.  Functionalities
    acquired with the communication package under the SCO
    operating system will continue under the NT system.


    SUPPORT RMS INTERFACES
    AIG's conversion of Sonic's POS to NT will include the
    current data format interfaces to support Flight-Ware RMS
    functions.

    T-LOG
    AIG will develop a T-Log application that will provide the
    mechanism to record data which is transmitted to the host.
    Examples include:
        Detailed item movement
        DSR data
        Employee time card information

    DEVELOP POS ENHANCEMENTS
    AIG will also implement some enhancements to the Sonic POS
    system during the conversion, including:
        A standardized flexible keyboard interface that will
        allow Sonic to make changes to the store keyboards and
        provide a platform for customized changes.
        Simplified Start-of-Day and End-of-Day procedures
        designed to minimize user interaction.

    SUPPORT PILOT INSTALLATION
    AIG will provide two days of on-site support at Sonic's
    pilot installation location to assist Sonic in installing
    the software and monitoring its functionality.  Following
    this two-day period, Sonic will contact the AIG Customer
    Support Network (CSN) for assistance and problem-resolution.

                           ASSUMPTIONS
The assumptions AIG used to develop scheduling and pricing are
listed in this section.  If any of these assumptions need to
change, AIG reserves the right to adjust our proposed costs and
timeframes.  For this project, AIG assumes:
  1)  All existing Sonic hardware, software, and peripherals are
      supportable under the Microsoft NT operating system
      (Version 4.0), including the PC, operator keyboards and
      monitors, scanners and keypads, bumpbars, register tapes
      printers, and manager line printers.
  2)  AIG will develop code to run on the current configuration
      of Sonic hardware.
  3)  Host applications will run on the headquarters AS/400.
  4)  Communications will interface to both the store NT system
      and the headquarters AS/400.
  5)  AIG will not modify any RMS application.
  6)  Sonic will pay for the installation and monthly cost of
      dial phone communications and leased telephone lines.
  7)  Sonic will provide the AS/400 disk storage required for
      storing the information related to this project.
  8)  AIG will continue to use the production polling hardware
      and supporting program products provided by Sonic during
      implementation of the Sonic SCO POS application
      enhancements and host interfaces, as described in the
      Addendum  #2, dated October 16, 1996, and signed by AIG and
      Sonic on October 16 and October 18, 1996, respectively.


  9)  Sonic will provide AIG with two functional in-store
      systems to support development of the Sonic POS application
      by November 1, 1996.
  10) Sonic will select a store location in the Oklahoma City
      metropolitan area for the pilot installation of the NT
      version of POS.
  11) AIG will use the version of Sonic's POS code provided to
      AIG by Sonic, labeled Version 3.01, for the NT conversion
      that will produce an NT system with comparable functions to
      Sonic's current SCO version.  No additional changes made by
      Flight-Ware to Sonic's POS code, or additional versions of
      Sonic's POS code produced by Flight-Ware, will be used by
      AIG during the conversion process.
  12) Sonic will approve design documents and written requests
      for information or respond with recommendations in a timely
      manner.
  13) AIG will build and support interfaces that have the same
      data requirements and layouts as the current SCO version.
  14) If AIG's lab environment or hardware or software becomes
      inoperable, Sonic and or Flight-Ware will provide timely
      replacement or assistance.
  15) Sonic will provide an NT compatible version of the RMS
      software to AIG by March 1, 1997.
  16) Sonic will get from Flight-Ware the necessary interface
      requirements to     Flight-Ware RMS application by December 15,
      1996.
  17) After AIG tests and installs the NT version of the Sonic
      POS system in the lab, Sonic will have two weeks to
      perform its acceptance testing.
  18) At the end of that two-week period, Sonic will provide AIG
      with a written statement identifying any issues or observations
      that may require AIG problem-resolution efforts.  After AIG has
      installed the NT version in the pilot store, all Sonic assistance requests
      or problem resolution issues will be handled through normal AIG CSN
      procedures.



                      TERMS AND CONDITIONS
All terms and conditions set out in the Master Agreement dated
July 31, 1996, including, but not limited to, terms regarding
project management, ownership, confidentiality, limitation of
liability, hiring of personnel, rights and remedies, taxes,
origin of agreement, resolution of disputes, and warranty govern
this Addendum.  In the event of any inconsistency between the
terms of this Addendum and the Master Agreement or any earlier
addendum, the terms of this Addendum will prevail.

<TABLE>
<CAPTION>
   <S>                    <C>         <C>                  <S>
   End of October 1996    $ 125,000   End of March 1997    $ 100,000
   End of November 1996   $ 125,000   End of April 1997    $ 100,000
   End of December 1996   $ 125,000   End of May 1997      $ 100,000
   End of January 1997    $ 100,000   End of June 1997     $ 100,000
   End of February 1997   $ 100,000

</TABLE>

Payments are due within 30 days of the date of invoice.  Out-of
pocket expenses will be invoiced monthly as they are incurred.
AIG may include charges on invoices for late payment that will
accrue at the rate of one and one-half percent (1 1/2 %) per
month (or the maximum rate allowed by law, whichever is less) on
the unpaid balance from the due date until the payment is
received by AIG.


           PROJECT TIMEFRAME / TERMINATION OF ADDENDUM

AIG will begin working on this project immediately upon the
signing of this Addendum by both parties and expects that this
project will be completed by June 30, 1997.

This Addendum will terminate ninety (90) days after completion of
the project, unless both parties mutually agree to extend the
Addendum.  The responsibilities for payment of fees agreed to in
this Addendum shall survive it.  All limitations of liability,
all terms regarding ownership of products and techniques, the
rights and remedies clause, provisions for resolution of
disputes, the restrictions regarding confidentiality, and other
relevant terms and conditions agreed to in the Master Agreement
dated July 31, 1996, shall survive this Addendum.

                       EXPIRATION OF OFFER

This offer expires 15 days from the date of this Addendum, unless
accepted and signed by both parties.

Sonic and AIG agree and acknowledge that they have read this
Addendum, and the attached Exhibit A entitled "Responsibility
Matrix", that they understand it, and that they shall be bound by
the terms and conditions.   The "Effective Date" of this Addendum
shall be the later of the dates shown below.

Applied Intelligence Group, Inc.        Sonic Corp.

Signature: /s/James H. Callison          Signature: /s/Lewis B.Kilbourne
Name: James H. Callison                  Name: Lewis B. Kilbourne
Title: Sr. Account Executive             Title: Senior Vice President
Date: October 24, 1996                   Date: November 6, 1996

<PAGE>

<TABLE>
<CAPTION>

                            Exhibit A
                      Responsibility Matrix
                             Path 2
      <S>                              <C>  <C>    <C>   <C>
                TASK                   AIG  SONIC  CCI   F-W
      Project Management                X
      Configure Sonic POS Hardware            X     X
      Evaluate Hardware Configuration
         Alternatives                                X    X
       Install Hardware in Lab          X           X
      Re-write Sonic POS to NT          X
      Standardize Item File on POS      X
      Develop T-Log Processing          X
      Set-Up Format for Polling         X
      Standardize Flexible Keyboard     X
      Simplify Start-of-Day/End-of-Day  X
      Standardize Price and Discounts   X
      Complete Design Document for NT
        Conversion                            X
      Approve Design for NT Conversion        X
      Develop Application Code          X
      Test Code                         X     X
      Perform Acceptance Testing              X
      Acquire Software Licenses               X
      Install Pilot Location            X
      Rollout to All Locations                X
      Construct Documentation                 X
      Perform Store Training                  X
      Provide Help Desk Support               X
      Internet/Phone Charges and Hardware     X
      Acquire and Install NT Version of RMS   X           X
      Perform Acceptance Testing of NT
        Version of RMS                              X
      Convert Current RMS Interfaces    X
</TABLE>