Updated to support ai