working AI with gui