automaticaly compute size of board