refactor set board size method
board optimization