refactoring of the board