refactored board as iterator