modifications to the drawing functions - adding highlighted squares, and some other modifications