ai is working but still has some bugs :(