edited AI.sql