add a mesh function.