basic AI
organized code