basically works now. AI is still naive.