Made slight modifications to AI