I copied the code from the file "aia2.cpp"