moved Ai into module