refactor Board class