refactor mesh sort and show