refactor centerBoard method