added AI stuff