more logic for AI.