finished basic AI