hw5 for AI