finished AI, needs more testing