helpful Mason/GeoMason code