Working version of the checkerboard detector