meshing function v1 done shit fuck