Added inversion to AI