refactored mesh