refactor specs and board_state