Squarefield checker and creation function