some refactoring of bot ai, still not work