updated the checkerboard code