mesh implementation