improved ai
added hash