Added second function to "Control AI"