getting AI working