refactor board iplementation