Added function in AI