finished AI ex2