moved MESH analysis functions