ai stuff and changed the Historyclass a bit