modified for AI