refactor mesh methods