added AI from hw 11