better mesh validity test