checkwin added to ai