refactoring Board class