transfering ai logic