funcions for 3x3 zones and minor changes