added ex3 in AI methods