moved stuff around in mesh.cpp