refactor AIghost