refractored buildBoard to a one line function