Updaates ai with new instance variable