final version, AI not enabled